package com.vcredit.creditcat.api;

import java.util.List;

import com.vcredit.creditcat.dto.CustCardDto;
import com.vcredit.creditcat.enumtype.BankCardTypeEnum;
import com.vcredit.creditcat.exception.CustCardExcetpion;
import com.vcredit.creditcat.model.Cust;

/**
 * @author chengchao
 *
 */
public interface ICustCardManager {

	/**
	 * 查询银行卡bin信息
	 * 
	 * @param cardNo
	 *            银行卡号
	 * @return
	 */
	CustCardDto queryCardBin(String cardNo) throws CustCardExcetpion;

	/**
	 * 获取用户的所有银行卡
	 * 
	 * @param custId
	 *            客户Id
	 * @return
	 */
	List<CustCardDto> queyCardsByCustId(Long custId, BankCardTypeEnum cardType);

	/**
	 * 绑定银行卡
	 * 
	 * @param cust
	 *            客户对象
	 * @param card
	 *            银行卡对象
	 * @throws CustCardExcetpion
	 */
	CustCardDto bindCustCard(Cust cust, CustCardDto cardDto) throws CustCardExcetpion;

	/**
	 * 绑卡成功后插入认证项日志
	 * @param cust
	 * @param cardDto
	 * @return
	 * @throws CustCardExcetpion
	 */
	CustCardDto bindCustCardAndItemDone(Cust cust, CustCardDto cardDto) throws Exception;

	/**
	 * 验卡
	 * 
	 * @param custName
	 *            客户姓名
	 * @param custIdNo
	 *            客户身份证
	 * @param accountNo
	 *            客户卡号
	 * @param mobile
	 *            客户手机号
	 * @param bankCode
	 *            银行编码
	 */
	Boolean checkCustCard(String custName, String custIdNo, String accountNo, String mobile, String bankCode)
			throws CustCardExcetpion;

	/**
	 * 
	 * @Title: queryByCardId @Description: (根据cardId找到默认的卡号) @param
	 *         cardId @return @throws Exception 参数 @return CustCardDto
	 *         返回类型 @throws
	 */
	CustCardDto queryByCardId(Long cardId) throws Exception;
}
